from volcenginesdkarkruntime import Ark
# 以华北 2 (北京) 为例，<ARK_BASE_URL> 处应改为 https://ark.cn-beijing.volces.com/api/v3
client = Ark(
    api_key="780242c1-b80a-43d1-b5a1-fcc5bea20248",
    base_url="https://ark.cn-beijing.volces.com/api/v3"
)

# 请求1
completion = client.chat.completions.create(
    model="doubao-1-5-pro-32k-250115",
    messages=[
        {"role": "system", "content": "你是一个模型助手"},
        {"role": "user", "content": "今天天气不错"},
    ],
)
print(completion.choices[0].message.content)
